<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>订单信息管理系统</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/stylesheets/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/stylesheets/font-awesome/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="/stylesheets/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="/stylesheets/AdminLTE.min.css">
  <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
        page. However, you can choose any other skin. Make sure you
        apply the skin class to the body tag so the changes take effect. -->
  <link rel="stylesheet" href="/stylesheets/skin-blue.min.css">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

  <!-- Google Font -->
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS         | skin-blue                               |
|               | skin-black                              |
|               | skin-purple                             |
|               | skin-yellow                             |
|               | skin-red                                |
|               | skin-green                              |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed                                   |
|               | layout-boxed                            |
|               | layout-top-nav                          |
|               | sidebar-collapse                        |
|               | sidebar-mini                            |
|---------------------------------------------------------|
-->
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <!-- Main Header -->
  <%- include("./header.ejs") %>
  
  <!-- Left side column. contains the logo and sidebar -->
  <%- include("./aside.ejs") %>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        订单信息管理系统
      </h1>
    </section>

    <!-- Main content -->
    <section class="content container-fluid">
      订单信息管理系统的内容区域
      <div class="box-body">
        <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
          <div class="row">
            <div class="col-sm-3">
              <div class="dataTables_length" id="example1_length">
                <label>Show <select name="example1_length" aria-controls="example1" class="form-control input-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>entries</label>
              </div>
            </div>
            <div class="col-sm-5">
              <div id="example1_filter" class="dataTables_filter" style="float:right">
                <form action="" method="post">
                  <label>
                    Search:
                    <input type="search" class="form-control input-sm" placeholder="" aria-controls="example1" name="search">
                  </label>
                  <button type="submit"><i class="fa fa-search"></i></button>
                  <a href="" class="fa fa-close" style="float: right;margin: 8px 0 0 4px;color: rgb(151, 148, 148);"></a>
                  <div style="width: 80px;height: 30px;float: right;margin-left: 4px;"></div>
                </form>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-12">
              <table id="example1" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                <thead>
                  <tr role="row">
                      <th width=60>序号</th>
                      <th>订单号</th>
                      <th width=100>图片</th>
                      <th width=200>名称</th>
                      <th>价格</th>
                      <th>数量</th>
                      <th>库存</th>
                      <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <% for(var i=0;i<data.length;i++){ %>
                    <% if(data[i].state === 1) { %>
                      <tr role="row" class="even">
                        <td><%= i+1 %></td>
                        <td><%= data[i].time %></td>
                        <% for(var o=0;o<data[i].proData.length;o++){ %>
                          <% if(data[i].proData.length > 1){ %>
                            <tr>
                              <td></td>
                              <td></td>
                              <td><img src="<%- data[i].proData[o].img %>" alt="" width="40"></td>
                              <td><%- data[i].proData[o].proName %></td>
                              <td><%- data[i].proData[o].price %></td>
                              <td><%- data[i].proData[o].num %></td>
                              <td><%- data[i].proData[o].stock %></td>
                            </tr>
                          <% }else{ %>
                            <td><img src="<%- data[i].proData[o].img %>" alt="" width="40"></td>
                            <td><%- data[i].proData[o].proName %></td>
                            <td><%- data[i].proData[o].price %></td>
                            <td><%- data[i].proData[o].num %></td>
                            <td><%- data[i].proData[o].stock %></td>
                          <% } %>
                        <% } %>
                        <% if(data[i].proData.length > 1){ %>
                          <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>
                              <a href="" class="fa fa-commenting-o" style="color: rgb(236, 102, 24);margin-right: 4px;"></a>
                              <a href="order/deliverGoods?orderNum=<%= data[i].time %>" class="fa fa-check-square-o" style="color:rgb(5, 150, 17)"></a>
                            </td>
                          </tr>
                          
                        <% }else{ %>
                          <td>
                            <a href="" class="fa fa-commenting-o" style="color: rgb(209, 17, 17);margin-right: 4px;"></a>
                            <a href="order/deliverGoods?orderNum=<%= data[i].time %>" class="fa fa-check-square-o" style="color:rgb(5, 150, 17)"></a>
                          </td>
                        <% } %>
                      </tr>
                    <% } %>
                  <% } %>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Main Footer -->
  <%- include("./footer.ejs") %>
</div>

<!-- jQuery 3 -->
<script src="javascripts/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="javascripts/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="javascripts/adminlte.min.js"></script>

</body>
</html>